package com.wuhunyu.client;

import com.wuhunyu.client.err.ServiceEduClientErr;
import com.wuhunyu.commonutils.result.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * 教育模块
 *
 * @author wuhunyu
 * @version 1.0
 * @date 2021-01-26 14:51
 */
@Component
@FeignClient(name = "service-edu",fallback = ServiceEduClientErr.class)
public interface ServiceEduClient {

    /**
     * 查询课程信息
     * @param courseId
     * @return
     */
    @PostMapping("/eduCourse/selectCourseForOrder/{courseId}")
    public CommonResult selectCourseForOrder(@PathVariable("courseId") String courseId);

    /**
     * 查询课程状态
     * @param courseId
     * @return
     */
    @PostMapping("/eduCourse/isCourse/{courseId}")
    public CommonResult isCourse(@PathVariable("courseId") String courseId);

}
